From a4b0bbdaed8d9798b8e9e093a77c62f94184c203 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 19 Sep 2002 16:00:12 +0000 Subject: [PATCH] Tighten the 'const' screws a little more to help Alex along. --- gpsbabel/defs.h | 6 +++--- gpsbabel/geo.c | 2 +- gpsbabel/gpsman.c | 2 +- gpsbabel/gpsutil.c | 2 +- gpsbabel/gpx.c | 2 +- gpsbabel/holux.c | 4 ++-- gpsbabel/magproto.c | 2 +- gpsbabel/mapsend.c | 2 +- gpsbabel/mapsource.c | 2 +- gpsbabel/pcx.c | 2 +- gpsbabel/tiger.c | 2 +- gpsbabel/util.c | 2 +- gpsbabel/waypt.c | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gpsbabel/defs.h b/gpsbabel/defs.h index 128abe1ae..71341364b 100644 --- a/gpsbabel/defs.h +++ b/gpsbabel/defs.h @@ -87,7 +87,7 @@ typedef void (*ff_deinit) (void); typedef void (*ff_read) (void); typedef void (*ff_write) (void); -typedef void (*waypt_cb) (waypoint *); +typedef void (*waypt_cb) (const waypoint *); void waypt_add (waypoint *); void route_add (waypoint *); void waypt_disp_all(waypt_cb); @@ -109,11 +109,11 @@ typedef struct ff_vecs { void waypt_init(void); void route_init(void); -void waypt_disp(waypoint *); +void waypt_disp(const waypoint *); void fatal(const char *, ...); ff_vecs_t *find_vec(char *); void disp_vecs(void); -void printposn(coord *c, int is_lat); +void printposn(const coord *c, int is_lat); void *xcalloc(size_t nmemb, size_t size); void *xmalloc(size_t size); diff --git a/gpsbabel/geo.c b/gpsbabel/geo.c index 1333c20f8..db6deb3b7 100644 --- a/gpsbabel/geo.c +++ b/gpsbabel/geo.c @@ -186,7 +186,7 @@ geo_read(void) } static void -geo_waypt_pr(waypoint *waypointp) +geo_waypt_pr(const waypoint *waypointp) { fprintf(ofd, "\n"); fprintf(ofd, "", waypointp->shortname); diff --git a/gpsbabel/gpsman.c b/gpsbabel/gpsman.c index 797fe4aa4..fbabe1ebc 100644 --- a/gpsbabel/gpsman.c +++ b/gpsbabel/gpsman.c @@ -57,7 +57,7 @@ gpsman_wr_deinit(void) } static void -gpsman_disp(waypoint *waypointp) +gpsman_disp(const waypoint *waypointp) { fprintf(out_file, "%-8.8s\t%s\t", waypointp->shortname, waypointp->description); diff --git a/gpsbabel/gpsutil.c b/gpsbabel/gpsutil.c index abae0c85a..79103d763 100644 --- a/gpsbabel/gpsutil.c +++ b/gpsbabel/gpsutil.c @@ -77,7 +77,7 @@ data_read(void) } static void -gpsutil_disp(waypoint *wpt) +gpsutil_disp(const waypoint *wpt) { double lon,lat; const char *icon_token; diff --git a/gpsbabel/gpx.c b/gpsbabel/gpx.c index 97c417725..0f03c110d 100644 --- a/gpsbabel/gpx.c +++ b/gpsbabel/gpx.c @@ -205,7 +205,7 @@ gpx_read(void) } static void -gpx_waypt_pr(waypoint *waypointp) +gpx_waypt_pr(const waypoint *waypointp) { fprintf(ofd, "\n", diff --git a/gpsbabel/holux.c b/gpsbabel/holux.c index 0bc0bd1e6..9d87f0127 100644 --- a/gpsbabel/holux.c +++ b/gpsbabel/holux.c @@ -171,7 +171,7 @@ char *mknshort (char *stIn,unsigned int sLen) -static void gpsutil_disp(waypoint *wpt) +static void holux_disp(const waypoint *wpt) { double lon,lat; struct tm *tm; @@ -266,7 +266,7 @@ static void data_write(void) ((RTEHDR *)&HxWFile[ROUTESTART])->used[sCount] = 0; - waypt_disp_all(gpsutil_disp); + waypt_disp_all(holux_disp); file_out = fopen(fOutname, "wb"); diff --git a/gpsbabel/magproto.c b/gpsbabel/magproto.c index 86f7d9211..9bad44098 100644 --- a/gpsbabel/magproto.c +++ b/gpsbabel/magproto.c @@ -716,7 +716,7 @@ mag_readwpt(void) static void -mag_waypt_pr(waypoint *waypointp) +mag_waypt_pr(const waypoint *waypointp) { double lon, lat; double ilon, ilat; diff --git a/gpsbabel/mapsend.c b/gpsbabel/mapsend.c index 7d9d3ac41..2064f3abf 100644 --- a/gpsbabel/mapsend.c +++ b/gpsbabel/mapsend.c @@ -236,7 +236,7 @@ mapsend_read(void) } static void -mapsend_waypt_pr(waypoint *waypointp) +mapsend_waypt_pr(const waypoint *waypointp) { int n; unsigned char c; diff --git a/gpsbabel/mapsource.c b/gpsbabel/mapsource.c index fe675a596..3db7d2d1e 100644 --- a/gpsbabel/mapsource.c +++ b/gpsbabel/mapsource.c @@ -96,7 +96,7 @@ mapsource_read(void) } static void -mapsource_waypt_pr(waypoint *waypointp) +mapsource_waypt_pr(const waypoint *waypointp) { char tbuf[1024]; char *tp = tbuf; diff --git a/gpsbabel/pcx.c b/gpsbabel/pcx.c index 9b5b347c5..039e1b2ef 100644 --- a/gpsbabel/pcx.c +++ b/gpsbabel/pcx.c @@ -94,7 +94,7 @@ data_read(void) } static void -gpsutil_disp(waypoint *wpt) +gpsutil_disp(const waypoint *wpt) { double lon,lat; signed int ilon, ilat; diff --git a/gpsbabel/tiger.c b/gpsbabel/tiger.c index 34a5196c1..4100a5290 100644 --- a/gpsbabel/tiger.c +++ b/gpsbabel/tiger.c @@ -91,7 +91,7 @@ abort(); } static void -gpsutil_disp(waypoint *wpt) +gpsutil_disp(const waypoint *wpt) { fprintf(file_out, "%f,%f:redpin:%s\n", wpt->position.longitude.degrees, diff --git a/gpsbabel/util.c b/gpsbabel/util.c index 66e729b06..08401650b 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -69,7 +69,7 @@ mkposn(const char *string) } void -printposn(coord *c, int is_lat) +printposn(const coord *c, int is_lat) { char d; if (is_lat) { diff --git a/gpsbabel/waypt.c b/gpsbabel/waypt.c index ce77d7a42..5a04006f5 100644 --- a/gpsbabel/waypt.c +++ b/gpsbabel/waypt.c @@ -45,7 +45,7 @@ waypt_count(void) } void -waypt_disp(waypoint *wpt) +waypt_disp(const waypoint *wpt) { if (wpt->creation_time) { printf("%s ", ctime(&wpt->creation_time)); -- 2.30.2